package com.gjxy.controller;

import com.gjxy.dao.SeCourseDao;
import com.gjxy.entity.SeCourse;
import com.gjxy.entity.SeCourseClass;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class IndexController {
    @Autowired
    private SeCourseDao seCourseDao;

    @RequestMapping("/")
    @ResponseBody
    public List<SeCourseClass> index () {
        return seCourseDao.getClassesByCourseId("1");
    }
}
